package com.awifi.com.thread.method;

/**
 * @description: ToDo
 * @author: marin
 * @time: 2020/6/28 22:18
 */
public class SyncMethodTest {
    public static void main(String[] args){
        SyncMethod syncMethod = new SyncMethod();
        Thread thread = new Thread(syncMethod);
        thread.start();
        for (int i = 0; i<20;i++){
            System.out.println(Thread.currentThread().getName()+" "+i);
        }

        RunableImpl runable = new RunableImpl();
        Thread thread1 = new Thread(runable);
        thread1.start();

        Thread thread2 = new Thread(runable);
        thread2.start();

        Thread thread3 = new Thread(runable);
        thread3.start();

    }
}
